package com.biShe.controller;


import com.biShe.entity.Store;
import com.biShe.mapper.StoreMapper;
import com.biShe.utils.Result;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 小刘
 * @since 2023-05-06
 */
@Configuration
@RestController
@RequestMapping("/store")
public class StoreController {
    @Autowired
    private StoreMapper storeMapper;

//    获取店铺信息
    @ApiOperation(value="获取商铺信息", notes="返回当前商铺信息")
    @GetMapping("/list")
    public Result list(){
        List<Store> storeList = storeMapper.selectList(null);
        return Result.succ(storeList);
    }
//    修改店铺信息
//    增加店铺信息
//    删除店铺信息（因为目前默认只有一个商品，先不改）
}

